#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>

#include "led_desc.h"

MODULE_LICENSE("GPL");

led_desc_t leds[] = 
{
    {74,"led1"},
	{90,"led2"},
	{72,"led3"}
};

leds_info_t led_info =
{
    .m_ledCounter = sizeof(leds)/sizeof(leds[0]),
    .m_leds = leds
};

void led_dev_release(struct device *dev)
{
    printk("enter: %s\n", __func__);
}

struct platform_device led_dev = 
{
    .name = "myleds",
    .dev = 
    {
        .platform_data = (void*)&led_info,
        .release = led_dev_release
    }
};

static int __init led_dev_init(void)
{
    platform_device_register(&led_dev);
    return 0;
}

static void __exit led_dev_exit(void)
{
    platform_device_unregister(&led_dev);
}

module_init(led_dev_init);
module_exit(led_dev_exit);